package com.example.healthsystem.entity;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.*;
//import org.springframework.security.core.GrantedAuthority;
//import org.springframework.security.core.authority.SimpleGrantedAuthority;
//import org.springframework.security.core.userdetails.UserDetails;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

@NoArgsConstructor
@Getter
@Setter
@ToString
public class user{
    private String id;
    private String username;
    private String password;
    private String name;
    private String college;
    private String role;
    private int situ;
}

//@NoArgsConstructor
//@Getter
//@Setter
//@ToString
//public class user implements UserDetails {
//    private Long id;
//    private String username;
//    private String password;
//    private String name;
//    private String college;
//    private String role;
//    private int situ;
//
//    @JsonIgnore
//    @Override
//    public Collection<? extends GrantedAuthority> getAuthorities(){
//        List<GrantedAuthority> authorityList=new ArrayList<>();
//        authorityList.add(new SimpleGrantedAuthority(role));
//        return authorityList;
//    }
//    @JsonIgnore
//    @Override
//    public boolean isAccountNonExpired() {
//        return true;
//    }
//
//    @JsonIgnore
//    @Override
//    public boolean isAccountNonLocked() {
//        return true;
//    }
//
//    @JsonIgnore
//    @Override
//    public boolean isCredentialsNonExpired() {
//        return true;
//    }
//
//    @JsonIgnore
//    @Override
//    public boolean isEnabled() {
//        return true;
//    }
//}
